<?php
/**
 * PatientSignalUpload4 model class file.
 *
 * @package   models
 * @since     1.0
 * @filesource
 */

/**
 * The 4th form in uploading signal, contains technologist information
 * 
 * PatientSignalUpload0 is a Form class. 
 * It is the data structure for keeping form data.
 */
class PatientSignalUpload4 extends CFormModel{

	/**
	 * @var string
	 */
	public $technologistName;
	/**
	 * @var string
	 */
	public $technologistQualification;
	/**
	 * @var integer
	 */
	public $technologistEVestGReference;
	
	/**
	 * Declares the validation rules.
	 * The rules will be used when requesting validation by call self.validate().
	 * Many class method will call self.validate(), eg: CActiveRecord.save().
	 * @return array validation rules for model attributes.
	 * @see PatientSignal
	 */
	public function rules()
	{
		return array(
			// duplicate the rules of mentioned attributes in PatientSignal
			array('technologistName, technologistQualification', 'required','on'=>'next'),
			array('technologistEVestGReference', 'default','value'=>''),
			array('technologistName, technologistQualification, technologistEVestGReference','length', 'max'=>255),
		);
	}

	/**
	 * Returns the labels for each column variables.
	 * This will be used to render label on page.
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'technologistName' => 'Name',
			'technologistQualification' => 'Qualification',
			'technologistEVestGReference' => 'EVestG System Accreditation Reference',
		);
	}
}
